<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    //第一种方法
  function f1(name,age) {
    console.log(name+":"+age);
  }
  f1("猪",15);
  //第二种方法
    let f2=function (name,age) {
        console.log(name+":"+age);
    }
    //第三种方法
    let f3=new Function("name","age","console.log(name+':'+age)")

</script>

</body>
</html>